package dfbz.homework1;

import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Set;

public class Test04 {
    public static void main(String[] args) {
        HashMap<Object, Object> map = new HashMap<>();
        map.put("邓超","孙俪");
        map.put("李晨","范冰冰");
        map.put("刘德华","柳岩");
        map.put("黄晓明","Baby");
        Set<Object> objects = map.keySet();
        Collection<Object> values = map.values();
        Iterator<Object> iterator = objects.iterator();
        Iterator<Object> iterator1 = values.iterator();
        while (iterator.hasNext()){
            while (iterator1.hasNext()){
                Object key = iterator.next();
                Object value = iterator1.next();
                System.out.println(key+"->"+value);
            }
        }
    }
}
